package cn.minsh.lims.eoms.modules.app.enums;

import lombok.Getter;

@Getter
public enum BusiTypeEnum {

    INSPECTIONPLAN(1,"巡检计划"),
    INSPECTIONORDER(2,"巡检工单"),
    MAINTENANCEPLAN(3,"保养计划"),
    MAINTENANCEORDER(4,"保养工单"),
    REPAIRORDER(5,"维修工单"),
    INSPECTIONORDER_SCOPE(6,"巡检工单范围"),
    ;

    private Integer code ;
    private String desc ;


    BusiTypeEnum(Integer code,String desc){
        this.code = code ;
        this.desc = desc ;
    }

    public static BusiTypeEnum valueOf(Integer code){
        for (BusiTypeEnum busiTypeEnum : values()){
            if (busiTypeEnum.getCode().equals(code)){
                return busiTypeEnum ;
            }
        }
        return null ;
    }

    public static String getDesc(Integer code){
        for (BusiTypeEnum busiTypeEnum : values()){
            if (busiTypeEnum.getCode().equals(code)){
                return busiTypeEnum.getDesc() ;
            }
        }
        return null ;
    }
}
